﻿// owner 蒋家伟

#include "DocumentChangedEventArgs.h"

// jsdk
#include "Dbg_Warn_Define.h"

using namespace jsdk;

jsdk::DocumentChangedEventArgs::DocumentChangedEventArgs(const IDocument* pDocument, DocumentChangedType status):
    m_docChangedType(status),
    m_wpDoc(pDocument)
{
}

const jsdk::DocumentChangedType& jsdk::DocumentChangedEventArgs::getDocumentChangedType() const
{
    return m_docChangedType;
}

const jsdk::IDocument* jsdk::DocumentChangedEventArgs::getDocument() const
{
    if (m_wpDoc)
        return m_wpDoc.get();
    return nullptr;
}
